package com.zrrd.io.propertiesDemo;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

/**
 * @author WanJl
 * @version 1.0
 * @title PropertiesDemo04
 * @description
 * @create 2023/10/15 11:42
 */
public class PropertiesDemo04 {
    public static void main(String[] args) throws IOException {
        Properties prop = new Properties();

        FileReader fr=new FileReader("prop.properties");
        prop.load(fr);

        String name = prop.getProperty("name");
        String age = prop.getProperty("age");
        String sex = prop.getProperty("sex");
        System.out.println(name);
        System.out.println(age);
        System.out.println(sex);

        fr.close();
    }
}
